<template>
  <el-button type="text" @click="open">点击打开 Message Box</el-button>
</template>

<script>
export default {
  props: {
    delArr: {
      type: Array,
      default: function () {
        return []
      }
    },
    isMessageBox: {
      type: Boolean,
      default: false
    },
  },


  methods: {
    open() {
      this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
      }).then(() => {

        this.$emit("handle-delete",this.delArr)

        /*this.$message({
          type: 'success',
          message: '删除成功!'
        });*/
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    }
  }
}
</script>